{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# 加载txt文件",
   "id": "6413054c4596395e"
  },
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-11-19T02:29:24.593237Z",
     "start_time": "2025-11-19T02:29:24.585236Z"
    }
   },
   "source": [
    "from langchain_community.document_loaders import TextLoader\n",
    "\n",
    "# 编码类型必须与原文件编码一致\n",
    "text_loader = TextLoader(file_path='asset/load/01-langchain-utf-8.txt', encoding='utf-8')\n",
    "# text_loader = TextLoader(file_path='asset/load/01-langchain-gbk.txt',encoding='gbk')\n",
    "\n",
    "# 返回List列表(Document对象)\n",
    "docs = text_loader.load()\n",
    "print(docs)"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[Document(metadata={'source': 'asset/load/01-langchain-utf-8.txt'}, page_content='LangChain 是一个用于构建基于大语言模型（LLM）应用的开发框架，旨在帮助开发者更高效地集成、管理和增强大语言模型的能力，构建端到端的应用程序。它提供了一套模块化工具和接口，支持从简单的文本生成到复杂的多步骤推理任务')]\n"
     ]
    }
   ],
   "execution_count": 6
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# 加载pdf文件",
   "id": "edca6b26358dbe39"
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "### 举例一、加载本地文件",
   "id": "acfb88be749143d9"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T02:50:15.912427Z",
     "start_time": "2025-11-19T02:50:15.886367Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain_community.document_loaders import PyPDFLoader\n",
    "\n",
    "pdf_loader = PyPDFLoader(file_path='asset/load/02-load.pdf')\n",
    "\n",
    "# 加载pdf文件，返回List列表(Document对象)\n",
    "docs = pdf_loader.load()\n",
    "print(len(docs))\n",
    "print(docs[0].metadata)\n",
    "for doc in docs:\n",
    "    print(\"→→→→→→→→\", doc.page_content)"
   ],
   "id": "ab894cc550148be5",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "{'producer': 'Microsoft® Word 2019', 'creator': 'Microsoft® Word 2019', 'creationdate': '2025-06-20T17:18:19+08:00', 'moddate': '2025-06-20T17:18:19+08:00', 'source': 'asset/load/02-load.pdf', 'total_pages': 1, 'page': 0, 'page_label': '1'}\n",
      "→→→→→→→→ \"他的车，他的命！ 他忽然想起来，一年，二年，至少有三四年；一滴汗，两滴汗，不\n",
      "知道多少万滴汗，才挣出那辆车。从风里雨里的咬牙，从饭里茶里的自苦，才赚出那辆车。\n",
      "那辆车是他的一切挣扎与困苦的总结果与报酬，像身经百战的武士的一颗徽章。……他老想\n",
      "着远远的一辆车，可以使他自由，独立，像自己的手脚的那么一辆车。\" \n",
      " \n",
      "\"他吃，他喝，他嫖，他赌，他懒，他狡猾， 因为他没了心，他的心被人家摘了去。他\n",
      "只剩下那个高大的肉架子，等着溃烂，预备着到乱死岗子去。……体面的、要强的、好梦想\n",
      "的、利己的、个人的、健壮的、伟大的祥子，不知陪着人家送了多少回殡；不知道何时何地\n",
      "会埋起他自己来， 埋起这堕落的、 自私的、 不幸的、 社会病胎里的产儿， 个人主义的末路鬼！\n",
      "\"\n"
     ]
    }
   ],
   "execution_count": 15
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "### 举例二、加载网络文件",
   "id": "4b609878bc4414d6"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T02:42:09.523245Z",
     "start_time": "2025-11-19T02:42:08.250645Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain_community.document_loaders import PyPDFLoader\n",
    "\n",
    "pdf_loader = PyPDFLoader(file_path='https://arxiv.org/pdf/2302.03803')\n",
    "docs = pdf_loader.load()\n",
    "\n",
    "# 加载pdf文件，返回List列表(Document对象)\n",
    "print(len(docs))\n",
    "print(docs[0].metadata)\n",
    "for doc in docs:\n",
    "    print(\"→→→→→→→→\", doc.page_content)"
   ],
   "id": "4401b62597ddb483",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "8\n",
      "{'producer': 'dvips + GPL Ghostscript GIT PRERELEASE 9.22', 'creator': 'LaTeX with hyperref', 'creationdate': '2023-02-08T20:27:28-05:00', 'moddate': '2023-02-08T20:27:28-05:00', 'title': '', 'subject': '', 'author': '', 'keywords': '', 'source': 'https://arxiv.org/pdf/2302.03803', 'total_pages': 8, 'page': 0, 'page_label': '1'}\n",
      "→→→→→→→→ arXiv:2302.03803v1  [math.AG]  7 Feb 2023\n",
      "A WEAK (k, k )-LEFSCHETZ THEOREM FOR PROJECTIVE\n",
      "TORIC ORBIFOLDS\n",
      "William D. Montoya\n",
      "Instituto de Matem´ atica, Estat´ ıstica e Computa¸ c˜ ao Cient´ ıﬁca,\n",
      "Universidade Estadual de Campinas (UNICAMP),\n",
      "Rua S´ ergio Buarque de Holanda 651, 13083-859, Campinas, SP , Brazil\n",
      "February 9, 2023\n",
      "Abstract\n",
      "Firstly we show a generalization of the (1,1)-Lefschetz theorem for projective\n",
      "toric orbifolds and secondly we prove that on 2k-dimensional quasi-smooth hyper-\n",
      "surfaces coming from quasi-smooth intersection surfaces, under the Cayley trick,\n",
      "every rational (k, k)-cohomology class is algebraic, i.e., the Hodge conjectureholds\n",
      "on them.\n",
      "1 Introduction\n",
      "In [3] we proved that, under suitable conditions, on a very general codimension s quasi-\n",
      "smooth intersection subvariety X in a projective toric orbifold Pd\n",
      "Σ with d +s = 2(k +1)\n",
      "the Hodge conjecture holds, that is, every (p, p )-cohomology class, under the Poincar´ e\n",
      "duality is a rational linear combination of fundamental classes of alge braic subvarieties\n",
      "of X. The proof of the above-mentioned result relies, for p ≠ d +1 − s, on a Lefschetz\n",
      "Date: February 9, 2023\n",
      "2020 Mathematics Subject Classiﬁcation: 14C30, 14M10, 14J70, 14M25\n",
      "Keywords: (1,1)- Lefschetz theorem, Hodge conjecture, toric varieties, complete intersection\n",
      "Email: wmontoya@ime.unicamp.br\n",
      "1\n",
      "→→→→→→→→ theorem ([7]) and the Hard Lefschetz theorem for projective orb ifolds ([11]). When p =\n",
      "d +1 −s the proof relies on the Cayley trick, a trick which associates to X a quasi-smooth\n",
      "hypersurface Y in a projective vector bundle, and the Cayley Proposition (4.3) which\n",
      "gives an isomorphism of some primitive cohomologies (4.2) of X and Y . The Cayley\n",
      "trick, following the philosophy of Mavlyutov in [7], reduces results kn own for quasi-smooth\n",
      "hypersurfaces to quasi-smooth intersection subvarieties. The id ea in this paper goes the\n",
      "other way around, we translate some results for quasi-smooth int ersection subvarieties to\n",
      "quasi-smooth hypersurfaces, mainly the (1, 1)-Lefschetz theorem.\n",
      "Acknowledgement. I thank Prof. Ugo Bruzzo and Tiago Fonseca for useful discus-\n",
      "sions. I also acknowledge support from FAPESP postdoctoral gra nt No. 2019/23499-7.\n",
      "2 Preliminaries and Notation\n",
      "2.1 Toric varieties\n",
      "Let M be a free abelian group of rank d, let N =Hom(M, Z ), and NR =N ⊗Z R.\n",
      "Deﬁnition 2.1. • A convex subset σ ⊂NR is a rational k-dimensional simplicial cone\n",
      "if there exist k linearly independent primitive elements e1, . . . , e k ∈ N such that σ =\n",
      "{µ1e1 +⋯+ µkek}.\n",
      "• The generators ei are integral if for every i and any nonnegative rational number µ\n",
      "the product µei is in N only if µ is an integer.\n",
      "• Given two rational simplicial cones σ, σ′ one says that σ′ is a face of σ (σ′ < σ) if\n",
      "the set of integral generators of σ′ is a subset of the set of integral generators of σ.\n",
      "• A ﬁnite set Σ ={σ1, . . . , σ t} of rational simplicial cones is called a rational simplicia l\n",
      "complete d-dimensional fan if:\n",
      "1. all faces of cones in Σ are in Σ ;\n",
      "2. if σ, σ ′ ∈Σ then σ ∩σ′ <σ and σ ∩σ′ <σ′;\n",
      "3. NR =σ1 ∪⋅⋅⋅∪ σt.\n",
      "A rational simplicial complete d-dimensional fan Σ deﬁnes a d-dimensional toric variety\n",
      "Pd\n",
      "Σ having only orbifold singularities which we assume to be projective. Mo reover, T ∶=\n",
      "N ⊗Z C∗ ≃ (C∗)d is the torus action on Pd\n",
      "Σ . We denote by Σ (i) the i-dimensional cones\n",
      "2\n",
      "→→→→→→→→ of Σ and each ρ ∈Σ corresponds to an irreducible T -invariant Weil divisor Dρ on Pd\n",
      "Σ . Let\n",
      "Cl(Σ ) be the group of Weil divisors on Pd\n",
      "Σ module rational equivalences.\n",
      "The total coordinate ring of Pd\n",
      "Σ is the polynomial ring S = C[xρ /divides.alt0 ρ ∈ Σ (1)], S has the\n",
      "Cl(Σ )-grading, a Weil divisor D =∑ρ∈Σ (1) uρDρ determines the monomial xu ∶=∏ρ∈Σ (1) xuρ\n",
      "ρ ∈\n",
      "S and conversely deg (xu)=[D]∈Cl(Σ ).\n",
      "For a cone σ ∈ Σ, ˆσ is the set of 1-dimensional cone in Σ that are not contained in σ\n",
      "and xˆσ ∶=∏ρ∈ˆσ xρ is the associated monomial in S.\n",
      "Deﬁnition 2.2. The irrelevant ideal of Pd\n",
      "Σ is the monomial ideal BΣ ∶=< xˆσ /divides.alt0 σ ∈ Σ > and\n",
      "the zero locus Z(Σ )∶=V(BΣ ) in the aﬃne space Ad ∶=Spec(S) is the irrelevant locus.\n",
      "Proposition 2.3 (Theorem 5.1.11 [5]) . The toric variety Pd\n",
      "Σ is a categorical quotient\n",
      "Ad ∖Z(Σ ) by the group Hom(Cl(Σ ), C∗) and the group action is induced by the Cl(Σ )-\n",
      "grading of S.\n",
      "2.2 Orbifolds\n",
      "Now we give a brief introduction to complex orbifolds and we mention th e needed theorems\n",
      "for the next section. Namely: de Rham theorem and Dolbeault theor em for complex\n",
      "orbifolds.\n",
      "Deﬁnition 2.4. A complex orbifold of complex dimension d is a singular complex space\n",
      "whose singularities are locally isomorphic to quotient sin gularities Cd/slash.left G, for ﬁnite sub-\n",
      "groups G ⊂Gl(d, C).\n",
      "Deﬁnition 2.5. A diﬀerential form on a complex orbifold Z is deﬁned locally at z ∈Z as\n",
      "a G-invariant diﬀerential form on Cd where G ⊂ Gl(d, C) and Z is locally isomorphic to\n",
      "Cd/slash.left G around z.\n",
      "Roughly speaking the local geometry of orbifolds reduces to local G-invariant geometry.\n",
      "We have a complex of diﬀerential forms (A●(Z), d )and a double complex (A●, ●(Z), ∂, ¯∂)\n",
      "of bigraded diﬀerential forms which deﬁne the de Rham and the Dolbe ault cohomology\n",
      "groups (for a ﬁxed p ∈N) respectively:\n",
      "H●\n",
      "dR(Z, C)∶= kerd\n",
      "im d and Hp, ●(Z, ¯∂)∶= ker ¯∂\n",
      "im ¯∂\n",
      "Theorem 2.6 (Theorem 3.4.4 in [4] and Theorem 1.2 in [1] ) . Let Z be a compact complex\n",
      "orbifold. There are natural isomorphisms:\n",
      "3\n",
      "→→→→→→→→ • H●\n",
      "dR(Z, C)≃H●(Z, C)\n",
      "• Hp, ●(Z, ¯∂)≃H●(X, Ω p\n",
      "Z )\n",
      "3 (1,1)-Lefschetz theorem for projective toric orbifolds\n",
      "Deﬁnition 3.1. A subvariety X ⊂Pd\n",
      "Σ is quasi-smooth if V(IX )⊂A#Σ (1) is smooth outside\n",
      "Z(Σ ).\n",
      "Example 3.2. Quasi-smooth hypersurfaces or more generally quasi-smooth inte rsection sub-\n",
      "varieties are quasi-smooth subvarieties (see [2] or [7] for more det ails).\n",
      "△\n",
      "Remark 3.3. Quasi-smooth subvarieties are suborbifolds of Pd\n",
      "Σ in the sense of Satake in [8].\n",
      "Intuitively speaking they are subvarieties whose only singularities co me from the ambient\n",
      "space.\n",
      "△\n",
      "Theorem 3.4. Let X ⊂ Pd\n",
      "Σ be a quasi-smooth subvariety. Then every (1, 1)-cohomology\n",
      "class λ ∈H1, 1(X)∩H2(X, Z) is algebraic\n",
      "Proof. From the exponential short exact sequence\n",
      "0 →Z →OX →O∗\n",
      "X →0\n",
      "we have a long exact sequence in cohomology\n",
      "H1(O∗\n",
      "X )→H2(X, Z) →H2(OX )≃H0, 2(X)\n",
      "where the last isomorphisms is due to Steenbrink in [9]. Now, it is enoug h to prove the\n",
      "commutativity of the next diagram\n",
      "H2(X, Z) → → \n",
      "↓ ↓ \n",
      "H2(X, OX )\n",
      "≃ Dolbeault\n",
      "↓ ↓ \n",
      "H2(X, C)\n",
      "de Rham ≃\n",
      "↓ ↓ \n",
      "H2\n",
      "dR(X, C) → → H0, 2\n",
      "¯∂ (X)\n",
      "4\n",
      "→→→→→→→→ The key points are the de Rham and Dolbeault’s isomorphisms for orbif olds. The rest\n",
      "of the proof follows as the (1, 1)-Lefschetz theorem in [6].\n",
      "Remark 3.5. For k = 1 and Pd\n",
      "Σ as the projective space, we recover the classical (1, 1)-\n",
      "Lefschetz theorem.\n",
      "△\n",
      "By the Hard Lefschetz Theorem for projective orbifolds (see [11] for details) we get an\n",
      "isomorphism of cohomologies :\n",
      "H●(X, Q) ≃H2 dim X−●(X, Q)\n",
      "given by the Lefschetz morphism and since it is a morphism of Hodge st ructures, we have:\n",
      "H1, 1(X, Q) ≃Hdim X−1, dim X−1(X, Q)\n",
      "For X as before:\n",
      "Corollary 3.6. If the dimension of X is 1, 2 or 3. The Hodge conjecture holds on X.\n",
      "Proof. If the dimCX = 1 the result is clear by the Hard Lefschetz theorem for projective\n",
      "orbifolds. The dimension 2 and 3 cases are covered by Theorem 3.5 an d the Hard Lefschetz.\n",
      "theorem.4 Cayley trick and Cayley proposition\n",
      "The Cayley trick is a way to associate to a quasi-smooth intersection subvariety a quasi-\n",
      "smooth hypersurface. Let L1, . . . , L s be line bundles on Pd\n",
      "Σ and let π ∶ P(E) → Pd\n",
      "Σ be the\n",
      "projective space bundle associated to the vector bundle E =L1 ⊕⋯⊕ Ls. It is known that\n",
      "P(E) is a (d +s −1)-dimensional simplicial toric variety whose fan depends on the degre es\n",
      "of the line bundles and the fan Σ. Furthermore, if the Cox ring, witho ut considering the\n",
      "grading, of Pd\n",
      "Σ is C[x1, . . . , x m] then the Cox ring of P(E) is\n",
      "C[x1, . . . , x m, y 1, . . . , y s]\n",
      "Moreover for X a quasi-smooth intersection subvariety cut oﬀ by f1, . . . , f s with deg(fi)=\n",
      "[Li] we relate the hypersurface Y cut oﬀ by F = y1f1 +⋅⋅⋅+ ysfs which turns out to be\n",
      "quasi-smooth. For more details see Section 2 in [7].\n",
      "5\n",
      "→→→→→→→→ We will denote P(E) as Pd+s−1\n",
      "Σ ,X to keep track of its relation with X and Pd\n",
      "Σ .\n",
      "The following is a key remark.\n",
      "Remark 4.1. There is a morphism ι∶X →Y ⊂Pd+s−1\n",
      "Σ ,X . Moreover every point z ∶=(x, y )∈Y\n",
      "with y ≠ 0 has a preimage. Hence for any subvariety W = V(IW ) ⊂ X ⊂ Pd\n",
      "Σ there exists\n",
      "W ′ ⊂Y ⊂Pd+s−1\n",
      "Σ ,X such that π(W ′)=W , i.e., W ′ ={z =(x, y ) /divides.alt0 x ∈W }.\n",
      "△\n",
      "For X ⊂ Pd\n",
      "Σ a quasi-smooth intersection variety the morphism in cohomology indu ced\n",
      "by the inclusion i∗ ∶Hd−s(Pd\n",
      "Σ , C)→Hd−s(X, C) is injective by Proposition 1.4 in [7].\n",
      "Deﬁnition 4.2. The primitive cohomology of Hd−s\n",
      "prim(X)is the quotient Hd−s(X, C)/slash.left i∗(Hd−s(Pd\n",
      "Σ , C))\n",
      "and Hd−s\n",
      "prim(X, Q) with rational coeﬃcients.\n",
      "Hd−s(Pd\n",
      "Σ , C) and Hd−s(X, C) have pure Hodge structures, and the morphism i∗ is com-\n",
      "patible with them, so that Hd−s\n",
      "prim(X) gets a pure Hodge structure.\n",
      "The next Proposition is the Cayley proposition.\n",
      "Proposition 4.3. [Proposition 2.3 in [3] ] Let X =X1 ∩⋅⋅⋅∩ Xs be a quasi-smooth intersec-\n",
      "tion subvariety in Pd\n",
      "Σ cut oﬀ by homogeneous polynomials f1 . . . f s. Then for p ≠ d+s−1\n",
      "2 , d+s−3\n",
      "2\n",
      "Hp−1,d +s−1−p\n",
      "prim (Y )≃Hp−s,d −p\n",
      "prim (X).\n",
      "Corollary 4.4. If d +s =2(k +1),\n",
      "Hk+1−s,k +1−s\n",
      "prim (X)≃Hk,k\n",
      "prim(Y )\n",
      "Remark 4.5. The above isomorphisms are also true with rational coeﬃcients since H●(X, C) =\n",
      "H●(X, Q)⊗Q C. See the beginning of Section 7.1 in [10] for more details.\n",
      "△\n",
      "5 Main result\n",
      "Theorem 5.1. Let Y ={F =y1f1 +⋯+ ykfk =0}⊂P2k+1\n",
      "Σ ,X be the quasi-smooth hypersurface\n",
      "associated to the quasi-smooth intersection surface X = Xf1 ∩⋅⋅⋅∩ Xfk ⊂ Pk+2\n",
      "Σ . Then on Y\n",
      "the Hodge conjecture holds.\n",
      "Proof. If Hk,k\n",
      "prim(X, Q) = 0 we are done. So let us assume Hk,k\n",
      "prim(X, Q) ≠ 0. By the Cayley\n",
      "proposition Hk,k\n",
      "prim(Y, Q) ≃ H1, 1\n",
      "prim(X, Q) and by the (1, 1)-Lefschetz theorem for projective\n",
      "6\n",
      "→→→→→→→→ toric orbifolds there is a non-zero algebraic basis λC1 , . . . , λ Cn with rational coeﬃcients of\n",
      "H1, 1\n",
      "prim(X, Q), that is, there are n ∶=h1, 1\n",
      "prim(X, Q) algebraic curves C1, . . . , C n in X such that\n",
      "under the Poincar´ e duality the class in homology [Ci] goes to λCi , [Ci] ↦ λCi . Recall\n",
      "that the Cox ring of Pk+2 is contained in the Cox ring of P2k+1\n",
      "Σ ,X without considering the\n",
      "grading. Considering the grading we have that if α ∈ Cl(Pk+2\n",
      "Σ ) then (α, 0) ∈ Cl(P2k+1\n",
      "Σ ,X ). So\n",
      "the polynomials deﬁning Ci ⊂ Pk+2\n",
      "Σ can be interpreted in P2k+1\n",
      "X, Σ but with diﬀerent degree.\n",
      "Moreover, by Remark 4.1 each Ci is contained in Y = {F = y1f1 + ⋯ + ykfk = 0} and\n",
      "furthermore it has codimension k.\n",
      "Claim: {λCi }n\n",
      "i=1 is a basis of Hk,k\n",
      "prim(Y, Q).\n",
      "It is enough to prove that λCi is diﬀerent from zero in Hk,k\n",
      "prim(Y, Q) or equivalently that the\n",
      "cohomology classes {λCi }n\n",
      "i=1 do not come from the ambient space. By contradiction, let us\n",
      "assume that there exists a j and C ⊂P2k+1\n",
      "Σ ,X such that λC ∈Hk,k (P2k+1\n",
      "Σ ,X , Q) with i∗(λC )=λCj\n",
      "or in terms of homology there exists a (k +2)-dimensional algebraic subvariety V ⊂ P2k+1\n",
      "Σ ,X\n",
      "such that V ∩Y = Cj so they are equal as a homology class of P2k+1\n",
      "Σ ,X ,i.e., [V ∩Y ] = [Cj] .\n",
      "It is easy to check that π(V )∩X =Cj as a subvariety of Pk+2\n",
      "Σ where π ∶ (x, y )↦x. Hence\n",
      "[π(V )∩X] = [Cj] which is equivalent to say that λCj comes from Pk+2\n",
      "Σ which contradicts\n",
      "the choice of [Cj].\n",
      "Remark 5.2. Into the proof of the previous theorem, the key fact was that on X the\n",
      "Hodge conjecture holds and we translate it to Y by contradiction. So, using an analogous\n",
      "argument we have:\n",
      "△\n",
      "Proposition 5.3. Let Y ={F =y1fs+⋯+ysfs =0}⊂P2k+1\n",
      "Σ ,X be the quasi-smooth hypersurface\n",
      "associated to a quasi-smooth intersection subvariety X = Xf1 ∩ ⋅⋅⋅ ∩ Xfs ⊂ Pd\n",
      "Σ such that\n",
      "d +s =2(k +1). If the Hodge conjecture holds on X then it holds as well on Y .\n",
      "Corollary 5.4. If the dimension of Y is 2s −1, 2s or 2s +1 then the Hodge conjecture\n",
      "holds on Y .\n",
      "Proof. By Proposition 5.3 and Corollary 3.6.\n",
      "7\n",
      "→→→→→→→→ References\n",
      "[1] Angella, D. Cohomologies of certain orbifolds. Journal of Geometry and Physics\n",
      "71 (2013), 117–126.\n",
      "[2] Batyrev, V. V., and Cox, D. A.On the Hodge structure of projective hypersur-\n",
      "faces in toric varieties. Duke Mathematical Journal 75, 2 (Aug 199 4).\n",
      "[3] Bruzzo, U., and Montoya, W. On the Hodge conjecture for quasi-smooth in-\n",
      "tersections in toric varieties. S˜ ao Paulo J. Math. Sci. Special Section: Geometry in\n",
      "Algebra and Algebra in Geometry (2021).\n",
      "[4] Caramello Jr, F. C.Introduction to orbifolds. arXiv:1909.08699v6 (2019).\n",
      "[5] Cox, D., Little, J., and Schenck, H.Toric varieties, vol. 124. American Math-\n",
      "ematical Soc., 2011.\n",
      "[6] Griffiths, P., and Harris, J. Principles of Algebraic Geometry. John Wiley &\n",
      "Sons, Ltd, 1978.\n",
      "[7] Mavlyutov, A. R. Cohomology of complete intersections in toric varieties. Pub-\n",
      "lished in Paciﬁc J. of Math. 191 No. 1 (1999), 133–144.\n",
      "[8] Satake, I. On a Generalization of the Notion of Manifold. Proceedings of the\n",
      "National Academy of Sciences of the United States of America 42, 6 (1956), 359–363.\n",
      "[9] Steenbrink, J. H. M.Intersection form for quasi-homogeneous singularities. Com-\n",
      "positio Mathematica 34 , 2 (1977), 211–223.\n",
      "[10] Voisin, C. Hodge Theory and Complex Algebraic Geometry I, vol. 1 of Cambridge\n",
      "Studies in Advanced Mathematics . Cambridge University Press, 2002.\n",
      "[11] W ang, Z. Z., and Zaffran, D.A remark on the Hard Lefschetz theorem for K¨ ahler\n",
      "orbifolds. Proceedings of the American Mathematical Society 137 , 08 (Aug 2009).\n",
      "8\n"
     ]
    }
   ],
   "execution_count": 14
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "## 举例三、使用load_and_split()方法\n",
    "如果不指定分割器，load_and_split() 使用默认的 RecursiveCharacterTextSplitter(chunk_size: 4000, chunk_overlap: 200)"
   ],
   "id": "4dd0f7de1a28feed"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T02:53:30.115675Z",
     "start_time": "2025-11-19T02:53:30.077666Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain_community.document_loaders import PyPDFLoader\n",
    "\n",
    "pdf_loader = PyPDFLoader(file_path='asset/load/02-load.pdf')\n",
    "docs = pdf_loader.load_and_split()\n",
    "print(len(docs))\n",
    "print(docs[0].metadata)\n",
    "for doc in docs:\n",
    "    print(\"→→→→→→→→\", doc.page_content)"
   ],
   "id": "8dbd89033936c59d",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "{'producer': 'Microsoft® Word 2019', 'creator': 'Microsoft® Word 2019', 'creationdate': '2025-06-20T17:18:19+08:00', 'moddate': '2025-06-20T17:18:19+08:00', 'source': 'asset/load/02-load.pdf', 'total_pages': 1, 'page': 0, 'page_label': '1'}\n",
      "→→→→→→→→ \"他的车，他的命！ 他忽然想起来，一年，二年，至少有三四年；一滴汗，两滴汗，不\n",
      "知道多少万滴汗，才挣出那辆车。从风里雨里的咬牙，从饭里茶里的自苦，才赚出那辆车。\n",
      "那辆车是他的一切挣扎与困苦的总结果与报酬，像身经百战的武士的一颗徽章。……他老想\n",
      "着远远的一辆车，可以使他自由，独立，像自己的手脚的那么一辆车。\" \n",
      " \n",
      "\"他吃，他喝，他嫖，他赌，他懒，他狡猾， 因为他没了心，他的心被人家摘了去。他\n",
      "只剩下那个高大的肉架子，等着溃烂，预备着到乱死岗子去。……体面的、要强的、好梦想\n",
      "的、利己的、个人的、健壮的、伟大的祥子，不知陪着人家送了多少回殡；不知道何时何地\n",
      "会埋起他自己来， 埋起这堕落的、 自私的、 不幸的、 社会病胎里的产儿， 个人主义的末路鬼！\n",
      "\"\n"
     ]
    }
   ],
   "execution_count": 16
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# 加载CSV文件",
   "id": "769b7c2e05b5f72c"
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 举例一、加载所有列",
   "id": "5523fa2f01a45e8"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T03:04:01.171971Z",
     "start_time": "2025-11-19T03:04:01.162969Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain_community.document_loaders import CSVLoader\n",
    "\n",
    "csv_loader = CSVLoader(file_path='asset/load/03-load.csv')\n",
    "\n",
    "# 加载CSV文件，返回List列表(Document对象)，每个Document对象的page_content是CSV文件的一行\n",
    "docs = csv_loader.load()\n",
    "print(len(docs))\n",
    "print(docs[0].metadata)\n",
    "for doc in docs:\n",
    "    print(\"→→→→→→→→\", doc.page_content)"
   ],
   "id": "1717955fb24a6bbb",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n",
      "{'source': 'asset/load/03-load.csv', 'row': 0}\n",
      "→→→→→→→→ id: 1\n",
      "title: Introduction to Python\n",
      "content: Python is a popular programming language.\n",
      "author: John Doe\n",
      "→→→→→→→→ id: 2\n",
      "title: Data Science Basics\n",
      "content: Data science involves statistics and machine learning.\n",
      "author: Jane Smith\n",
      "→→→→→→→→ id: 3\n",
      "title: Web Development\n",
      "content: HTML, CSS and JavaScript are core web technologies.\n",
      "author: Mike Johnson\n",
      "→→→→→→→→ id: 4\n",
      "title: Artificial Intelligence\n",
      "content: AI is transforming many industries.\n",
      "author: Sarah Williams\n"
     ]
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 举例二、加载指定列",
   "id": "b766cf21aaf64ecd"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T03:11:34.716835Z",
     "start_time": "2025-11-19T03:11:34.698831Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain_community.document_loaders import CSVLoader\n",
    "\n",
    "csv_loader = CSVLoader(file_path='asset/load/03-load.csv', source_column=\"author\")\n",
    "docs = csv_loader.load()\n",
    "print(len(docs))\n",
    "for doc in docs:\n",
    "    print(\"→→→→→→→→\", doc.metadata[\"source\"])"
   ],
   "id": "460c38f97bf6b054",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n",
      "→→→→→→→→ John Doe\n",
      "→→→→→→→→ Jane Smith\n",
      "→→→→→→→→ Mike Johnson\n",
      "→→→→→→→→ Sarah Williams\n"
     ]
    }
   ],
   "execution_count": 21
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# 加载JSON文件",
   "id": "8ef57de49bd7b040"
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 举例一、加载所有数据",
   "id": "85a05a5e93f74b56"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T03:35:39.661163Z",
     "start_time": "2025-11-19T03:35:39.645160Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain_community.document_loaders import JSONLoader\n",
    "from pprint import pprint\n",
    "\n",
    "json_loader = JSONLoader(file_path='asset/load/04-load.json',\n",
    "                         jq_schema=\".\",  # 加载所有字段\n",
    "                         text_content=False  # 将加载的JSON对象转换为字符串\n",
    "                         )\n",
    "\n",
    "docs = json_loader.load()\n",
    "pprint(docs)"
   ],
   "id": "ad69feaa52c3e518",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[Document(metadata={'source': 'D:\\\\python-project\\\\langchain\\\\7.retrieval\\\\asset\\\\load\\\\04-load.json', 'seq_num': 1}, page_content='{\"messages\": [{\"sender\": \"Alice\", \"content\": \"Hello, how are you today?\", \"timestamp\": \"2023-05-15T10:00:00\"}, {\"sender\": \"Bob\", \"content\": \"I\\'m doing well, thanks for asking!\", \"timestamp\": \"2023-05-15T10:02:00\"}, {\"sender\": \"Alice\", \"content\": \"Would you like to meet for lunch?\", \"timestamp\": \"2023-05-15T10:05:00\"}, {\"sender\": \"Bob\", \"content\": \"Sure, that sounds great!\", \"timestamp\": \"2023-05-15T10:07:00\"}], \"conversation_id\": \"conv_12345\", \"participants\": [\"Alice\", \"Bob\"]}')]\n"
     ]
    }
   ],
   "execution_count": 40
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 举例二、加载单个字段（jq_schema）",
   "id": "65c25903bb2d309a"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T03:39:41.305548Z",
     "start_time": "2025-11-19T03:39:41.290543Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain_community.document_loaders import JSONLoader\n",
    "\n",
    "json_loader = JSONLoader(file_path='asset/load/04-load.json',\n",
    "                         jq_schema=\".messages[].content\")\n",
    "\n",
    "docs = json_loader.load()\n",
    "print(len(docs))\n",
    "for doc in docs:\n",
    "    print(\"→→→→→→→→\", doc.page_content)"
   ],
   "id": "8fcae55513046a4",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n",
      "→→→→→→→→ Hello, how are you today?\n",
      "→→→→→→→→ I'm doing well, thanks for asking!\n",
      "→→→→→→→→ Would you like to meet for lunch?\n",
      "→→→→→→→→ Sure, that sounds great!\n"
     ]
    }
   ],
   "execution_count": 42
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 举例三、加载多个字段（content_key）",
   "id": "628a59aec2a2e64d"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T03:51:26.112348Z",
     "start_time": "2025-11-19T03:51:26.085309Z"
    }
   },
   "cell_type": "code",
   "source": [
    "json_loader = JSONLoader(file_path='asset/load/04-response.json',\n",
    "                         jq_schema=\".data.items[]\",\n",
    "                         content_key='\"\\n[title]:\" + .title + \"\\\\n[content]:\" + .content',\n",
    "                         is_content_key_jq_parsable=True  # 用jq解析content_key)\n",
    "                         )\n",
    "\n",
    "docs = json_loader.load()\n",
    "print(len(docs))\n",
    "for doc in docs:\n",
    "    print(\"→→→→→→→→\", doc.page_content)"
   ],
   "id": "53ae5505454180ef",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3\n",
      "→→→→→→→→ \n",
      "[title]:Understanding JSONLoader\n",
      "[content]:This article explains how to parse API responses...\n",
      "→→→→→→→→ \n",
      "[title]:Advanced jq Schema Patterns\n",
      "[content]:Learn to handle nested structures with...\n",
      "→→→→→→→→ \n",
      "[title]:LangChain Metadata Handling\n",
      "[content]:Best practices for preserving metadata...\n"
     ]
    }
   ],
   "execution_count": 55
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# 加载HTML文件",
   "id": "bb309efa40f0d89a"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-19T12:19:37.246667Z",
     "start_time": "2025-11-19T12:19:30.778680Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from langchain.document_loaders import UnstructuredHTMLLoader\n",
    "\n",
    "html_loader = UnstructuredHTMLLoader(\n",
    "    file_path=\"asset/load/05-load.html\",\n",
    "    mode=\"elements\",\n",
    "    strategy=\"fast\"\n",
    ")\n",
    "# 3.加载\n",
    "docs = html_loader.load()\n",
    "print(len(docs)) # 16\n",
    "# 4.打印\n",
    "for doc in docs:\n",
    "    print(doc)"
   ],
   "id": "549e8f8cb1b07269",
   "outputs": [
    {
     "ename": "BadZipFile",
     "evalue": "File is not a zip file",
     "output_type": "error",
     "traceback": [
      "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[1;31mBadZipFile\u001B[0m                                Traceback (most recent call last)",
      "Cell \u001B[1;32mIn[1], line 9\u001B[0m\n\u001B[0;32m      3\u001B[0m html_loader \u001B[38;5;241m=\u001B[39m UnstructuredHTMLLoader(\n\u001B[0;32m      4\u001B[0m     file_path\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124masset/load/05-load.html\u001B[39m\u001B[38;5;124m\"\u001B[39m,\n\u001B[0;32m      5\u001B[0m     mode\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124melements\u001B[39m\u001B[38;5;124m\"\u001B[39m,\n\u001B[0;32m      6\u001B[0m     strategy\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mfast\u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[0;32m      7\u001B[0m )\n\u001B[0;32m      8\u001B[0m \u001B[38;5;66;03m# 3.加载\u001B[39;00m\n\u001B[1;32m----> 9\u001B[0m docs \u001B[38;5;241m=\u001B[39m \u001B[43mhtml_loader\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mload\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m     10\u001B[0m \u001B[38;5;28mprint\u001B[39m(\u001B[38;5;28mlen\u001B[39m(docs)) \u001B[38;5;66;03m# 16\u001B[39;00m\n\u001B[0;32m     11\u001B[0m \u001B[38;5;66;03m# 4.打印\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\langchain_core\\document_loaders\\base.py:32\u001B[0m, in \u001B[0;36mBaseLoader.load\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m     30\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21mload\u001B[39m(\u001B[38;5;28mself\u001B[39m) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m \u001B[38;5;28mlist\u001B[39m[Document]:\n\u001B[0;32m     31\u001B[0m \u001B[38;5;250m    \u001B[39m\u001B[38;5;124;03m\"\"\"Load data into Document objects.\"\"\"\u001B[39;00m\n\u001B[1;32m---> 32\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mlist\u001B[39;49m\u001B[43m(\u001B[49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mlazy_load\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\u001B[43m)\u001B[49m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\langchain_community\\document_loaders\\unstructured.py:107\u001B[0m, in \u001B[0;36mUnstructuredBaseLoader.lazy_load\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m    105\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21mlazy_load\u001B[39m(\u001B[38;5;28mself\u001B[39m) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m Iterator[Document]:\n\u001B[0;32m    106\u001B[0m \u001B[38;5;250m    \u001B[39m\u001B[38;5;124;03m\"\"\"Load file.\"\"\"\u001B[39;00m\n\u001B[1;32m--> 107\u001B[0m     elements \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_get_elements\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m    108\u001B[0m     \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_post_process_elements(elements)\n\u001B[0;32m    109\u001B[0m     \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mmode \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124melements\u001B[39m\u001B[38;5;124m\"\u001B[39m:\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\langchain_community\\document_loaders\\html.py:49\u001B[0m, in \u001B[0;36mUnstructuredHTMLLoader._get_elements\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m     48\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21m_get_elements\u001B[39m(\u001B[38;5;28mself\u001B[39m) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m List:\n\u001B[1;32m---> 49\u001B[0m     \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpartition\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mhtml\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m partition_html\n\u001B[0;32m     51\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m partition_html(filename\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mfile_path, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39m\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39munstructured_kwargs)\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\unstructured\\partition\\html\\__init__.py:1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpartition\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mhtml\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpartition\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m partition_html\n\u001B[0;32m      3\u001B[0m __all__ \u001B[38;5;241m=\u001B[39m [\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mpartition_html\u001B[39m\u001B[38;5;124m\"\u001B[39m]\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\unstructured\\partition\\html\\partition.py:17\u001B[0m\n\u001B[0;32m     15\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mfile_utils\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mmodel\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m FileType\n\u001B[0;32m     16\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpartition\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mcommon\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mmetadata\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m apply_metadata, get_last_modified_date\n\u001B[1;32m---> 17\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpartition\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mhtml\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mparser\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m Flow, html_parser\n\u001B[0;32m     18\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpartition\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mhtml\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mtransformations\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m (\n\u001B[0;32m     19\u001B[0m     ontology_to_unstructured_elements,\n\u001B[0;32m     20\u001B[0m     parse_html_to_ontology,\n\u001B[0;32m     21\u001B[0m )\n\u001B[0;32m     22\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mutils\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m is_temp_file_path, lazyproperty\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\unstructured\\partition\\html\\parser.py:100\u001B[0m\n\u001B[0;32m     87\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mcommon\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mhtml_table\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m htmlify_matrix_of_cell_texts\n\u001B[0;32m     88\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mdocuments\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01melements\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m (\n\u001B[0;32m     89\u001B[0m     Address,\n\u001B[0;32m     90\u001B[0m     Element,\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m     98\u001B[0m     Title,\n\u001B[0;32m     99\u001B[0m )\n\u001B[1;32m--> 100\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpartition\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mtext_type\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m (\n\u001B[0;32m    101\u001B[0m     is_bulleted_text,\n\u001B[0;32m    102\u001B[0m     is_email_address,\n\u001B[0;32m    103\u001B[0m     is_possible_narrative_text,\n\u001B[0;32m    104\u001B[0m     is_us_city_state_zip,\n\u001B[0;32m    105\u001B[0m )\n\u001B[0;32m    106\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mutils\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m lazyproperty\n\u001B[0;32m    108\u001B[0m \u001B[38;5;66;03m# ------------------------------------------------------------------------------------------------\u001B[39;00m\n\u001B[0;32m    109\u001B[0m \u001B[38;5;66;03m# DOMAIN MODEL\u001B[39;00m\n\u001B[0;32m    110\u001B[0m \u001B[38;5;66;03m# ------------------------------------------------------------------------------------------------\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\unstructured\\partition\\text_type.py:20\u001B[0m\n\u001B[0;32m     11\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mnlp\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01menglish_words\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m ENGLISH_WORDS\n\u001B[0;32m     12\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mnlp\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mpatterns\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m (\n\u001B[0;32m     13\u001B[0m     EMAIL_ADDRESS_PATTERN_RE,\n\u001B[0;32m     14\u001B[0m     ENDS_IN_PUNCT_RE,\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m     18\u001B[0m     US_PHONE_NUMBERS_RE,\n\u001B[0;32m     19\u001B[0m )\n\u001B[1;32m---> 20\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21;01munstructured\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mnlp\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mtokenize\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m pos_tag, sent_tokenize, word_tokenize\n\u001B[0;32m     22\u001B[0m POS_VERB_TAGS: Final[List[\u001B[38;5;28mstr\u001B[39m]] \u001B[38;5;241m=\u001B[39m [\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mVB\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mVBG\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mVBD\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mVBN\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mVBP\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mVBZ\u001B[39m\u001B[38;5;124m\"\u001B[39m]\n\u001B[0;32m     23\u001B[0m ENGLISH_WORD_SPLIT_RE \u001B[38;5;241m=\u001B[39m re\u001B[38;5;241m.\u001B[39mcompile(\u001B[38;5;124mr\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124m[\u001B[39m\u001B[38;5;124m\\\u001B[39m\u001B[38;5;124ms\u001B[39m\u001B[38;5;124m\\\u001B[39m\u001B[38;5;124m-,.!?_\u001B[39m\u001B[38;5;124m\\\u001B[39m\u001B[38;5;124m/]+\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\unstructured\\nlp\\tokenize.py:48\u001B[0m\n\u001B[0;32m     46\u001B[0m \u001B[38;5;66;03m# auto download nltk packages if the environment variable is set\u001B[39;00m\n\u001B[0;32m     47\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m os\u001B[38;5;241m.\u001B[39mgetenv(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mAUTO_DOWNLOAD_NLTK\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mTrue\u001B[39m\u001B[38;5;124m\"\u001B[39m)\u001B[38;5;241m.\u001B[39mlower() \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mtrue\u001B[39m\u001B[38;5;124m\"\u001B[39m:\n\u001B[1;32m---> 48\u001B[0m     \u001B[43mdownload_nltk_packages\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m     51\u001B[0m \u001B[38;5;129m@lru_cache\u001B[39m(maxsize\u001B[38;5;241m=\u001B[39mCACHE_MAX_SIZE)\n\u001B[0;32m     52\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21msent_tokenize\u001B[39m(text: \u001B[38;5;28mstr\u001B[39m) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m List[\u001B[38;5;28mstr\u001B[39m]:\n\u001B[0;32m     53\u001B[0m \u001B[38;5;250m    \u001B[39m\u001B[38;5;124;03m\"\"\"A wrapper around the NLTK sentence tokenizer with LRU caching enabled.\"\"\"\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\unstructured\\nlp\\tokenize.py:33\u001B[0m, in \u001B[0;36mdownload_nltk_packages\u001B[1;34m()\u001B[0m\n\u001B[0;32m     30\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;21mdownload_nltk_packages\u001B[39m():\n\u001B[0;32m     31\u001B[0m \u001B[38;5;250m    \u001B[39m\u001B[38;5;124;03m\"\"\"If required NLTK packages are not available, download them.\"\"\"\u001B[39;00m\n\u001B[1;32m---> 33\u001B[0m     tagger_available \u001B[38;5;241m=\u001B[39m \u001B[43mcheck_for_nltk_package\u001B[49m\u001B[43m(\u001B[49m\n\u001B[0;32m     34\u001B[0m \u001B[43m        \u001B[49m\u001B[43mpackage_category\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mtaggers\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\n\u001B[0;32m     35\u001B[0m \u001B[43m        \u001B[49m\u001B[43mpackage_name\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43maveraged_perceptron_tagger_eng\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\n\u001B[0;32m     36\u001B[0m \u001B[43m    \u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m     37\u001B[0m     tokenizer_available \u001B[38;5;241m=\u001B[39m check_for_nltk_package(\n\u001B[0;32m     38\u001B[0m         package_category\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mtokenizers\u001B[39m\u001B[38;5;124m\"\u001B[39m, package_name\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mpunkt_tab\u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[0;32m     39\u001B[0m     )\n\u001B[0;32m     41\u001B[0m     \u001B[38;5;28;01mif\u001B[39;00m (\u001B[38;5;129;01mnot\u001B[39;00m tokenizer_available) \u001B[38;5;129;01mor\u001B[39;00m (\u001B[38;5;129;01mnot\u001B[39;00m tagger_available):\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\unstructured\\nlp\\tokenize.py:24\u001B[0m, in \u001B[0;36mcheck_for_nltk_package\u001B[1;34m(package_name, package_category)\u001B[0m\n\u001B[0;32m     21\u001B[0m     paths\u001B[38;5;241m.\u001B[39mappend(path)\n\u001B[0;32m     23\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m---> 24\u001B[0m     \u001B[43mnltk\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mfind\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;124;43mf\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;132;43;01m{\u001B[39;49;00m\u001B[43mpackage_category\u001B[49m\u001B[38;5;132;43;01m}\u001B[39;49;00m\u001B[38;5;124;43m/\u001B[39;49m\u001B[38;5;132;43;01m{\u001B[39;49;00m\u001B[43mpackage_name\u001B[49m\u001B[38;5;132;43;01m}\u001B[39;49;00m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mpaths\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mpaths\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m     25\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;01mTrue\u001B[39;00m\n\u001B[0;32m     26\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m (\u001B[38;5;167;01mLookupError\u001B[39;00m, \u001B[38;5;167;01mOSError\u001B[39;00m):\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\nltk\\data.py:551\u001B[0m, in \u001B[0;36mfind\u001B[1;34m(resource_name, paths)\u001B[0m\n\u001B[0;32m    549\u001B[0m modified_name \u001B[38;5;241m=\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124m/\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;241m.\u001B[39mjoin(pieces[:i] \u001B[38;5;241m+\u001B[39m [pieces[i] \u001B[38;5;241m+\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124m.zip\u001B[39m\u001B[38;5;124m\"\u001B[39m] \u001B[38;5;241m+\u001B[39m pieces[i:])\n\u001B[0;32m    550\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 551\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43mfind\u001B[49m\u001B[43m(\u001B[49m\u001B[43mmodified_name\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mpaths\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m    552\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mLookupError\u001B[39;00m:\n\u001B[0;32m    553\u001B[0m     \u001B[38;5;28;01mpass\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\nltk\\data.py:538\u001B[0m, in \u001B[0;36mfind\u001B[1;34m(resource_name, paths)\u001B[0m\n\u001B[0;32m    536\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m os\u001B[38;5;241m.\u001B[39mpath\u001B[38;5;241m.\u001B[39mexists(p):\n\u001B[0;32m    537\u001B[0m     \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m--> 538\u001B[0m         \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43mZipFilePathPointer\u001B[49m\u001B[43m(\u001B[49m\u001B[43mp\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mzipentry\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m    539\u001B[0m     \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mOSError\u001B[39;00m:\n\u001B[0;32m    540\u001B[0m         \u001B[38;5;66;03m# resource not in zipfile\u001B[39;00m\n\u001B[0;32m    541\u001B[0m         \u001B[38;5;28;01mcontinue\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\nltk\\data.py:391\u001B[0m, in \u001B[0;36mZipFilePathPointer.__init__\u001B[1;34m(self, zipfile, entry)\u001B[0m\n\u001B[0;32m    383\u001B[0m \u001B[38;5;250m\u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m    384\u001B[0m \u001B[38;5;124;03mCreate a new path pointer pointing at the specified entry\u001B[39;00m\n\u001B[0;32m    385\u001B[0m \u001B[38;5;124;03min the given zipfile.\u001B[39;00m\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m    388\u001B[0m \u001B[38;5;124;03mdoes not contain the specified entry.\u001B[39;00m\n\u001B[0;32m    389\u001B[0m \u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m    390\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(zipfile, \u001B[38;5;28mstr\u001B[39m):\n\u001B[1;32m--> 391\u001B[0m     zipfile \u001B[38;5;241m=\u001B[39m \u001B[43mOpenOnDemandZipFile\u001B[49m\u001B[43m(\u001B[49m\u001B[43mos\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mpath\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mabspath\u001B[49m\u001B[43m(\u001B[49m\u001B[43mzipfile\u001B[49m\u001B[43m)\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m    393\u001B[0m \u001B[38;5;66;03m# Check that the entry exists:\u001B[39;00m\n\u001B[0;32m    394\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m entry:\n\u001B[0;32m    395\u001B[0m     \u001B[38;5;66;03m# Normalize the entry string, it should be relative:\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\site-packages\\nltk\\data.py:1020\u001B[0m, in \u001B[0;36mOpenOnDemandZipFile.__init__\u001B[1;34m(self, filename)\u001B[0m\n\u001B[0;32m   1018\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(filename, \u001B[38;5;28mstr\u001B[39m):\n\u001B[0;32m   1019\u001B[0m     \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mTypeError\u001B[39;00m(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mReopenableZipFile filename must be a string\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[1;32m-> 1020\u001B[0m \u001B[43mzipfile\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mZipFile\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[38;5;21;43m__init__\u001B[39;49m\u001B[43m(\u001B[49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mfilename\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m   1021\u001B[0m \u001B[38;5;28;01massert\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mfilename \u001B[38;5;241m==\u001B[39m filename\n\u001B[0;32m   1022\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mclose()\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\zipfile.py:1272\u001B[0m, in \u001B[0;36mZipFile.__init__\u001B[1;34m(self, file, mode, compression, allowZip64, compresslevel, strict_timestamps)\u001B[0m\n\u001B[0;32m   1270\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m   1271\u001B[0m     \u001B[38;5;28;01mif\u001B[39;00m mode \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mr\u001B[39m\u001B[38;5;124m'\u001B[39m:\n\u001B[1;32m-> 1272\u001B[0m         \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_RealGetContents\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m   1273\u001B[0m     \u001B[38;5;28;01melif\u001B[39;00m mode \u001B[38;5;129;01min\u001B[39;00m (\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mw\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mx\u001B[39m\u001B[38;5;124m'\u001B[39m):\n\u001B[0;32m   1274\u001B[0m         \u001B[38;5;66;03m# set the modified flag so central directory gets written\u001B[39;00m\n\u001B[0;32m   1275\u001B[0m         \u001B[38;5;66;03m# even if no files are added to the archive\u001B[39;00m\n\u001B[0;32m   1276\u001B[0m         \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_didModify \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mTrue\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Environment\\Conda\\envs\\pyth310\\lib\\zipfile.py:1339\u001B[0m, in \u001B[0;36mZipFile._RealGetContents\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m   1337\u001B[0m     \u001B[38;5;28;01mraise\u001B[39;00m BadZipFile(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mFile is not a zip file\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m   1338\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m endrec:\n\u001B[1;32m-> 1339\u001B[0m     \u001B[38;5;28;01mraise\u001B[39;00m BadZipFile(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mFile is not a zip file\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m   1340\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mdebug \u001B[38;5;241m>\u001B[39m \u001B[38;5;241m1\u001B[39m:\n\u001B[0;32m   1341\u001B[0m     \u001B[38;5;28mprint\u001B[39m(endrec)\n",
      "\u001B[1;31mBadZipFile\u001B[0m: File is not a zip file"
     ]
    }
   ],
   "execution_count": 1
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
